package basic.com.liz.learn.design.builder;

import java.util.ArrayList;
import java.util.List;

import basic.com.liz.learn.design.factory.MailSender;
import basic.com.liz.learn.design.factory.Sender;
import basic.com.liz.learn.design.factory.SmsSender;

public class Builder
{
    
    private List<Sender> list = new ArrayList<Sender>();
    
    public void produceMailSender(int count)
    {
        for (int i = 0; i < count; i++)
        {
            list.add(new MailSender());
        }
        list.get(0).send();
    }
    
    public List<Sender> produceSmsSender(int count)
    {
        for (int i = 0; i < count; i++)
        {
            list.add(new SmsSender());
        }
        return list;
    }
}
